home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_07
/
9n07064a
< prev
next >
Wrap
Text File
|
1991-05-05
|
1KB
|
42 lines
/***********************************************************
* *
* Listing #2 *
* *
* Non-Simulated 2-D array test case for modified Small *
* C V2.0. From CUG disk #163, and PC Club of Toronto *
* #152. This listing is identical in function to *
* listing #1 but uses the extended compiler. *
* *
* 1/91 - Don Lang *
***********************************************************/
/*
Declaration for c.lib
*/
extern int printf();
char garray[2][2] = {1, 2, 3, 4};
main()
{
ga_print(2,2, garray);
}
/*
This global print function will test passing of
array arguments, and thus the modified Small C
function "doargs."
*/
ga_print (a,b, array) int a,b; char array[][2];
{
int i,k;
printf("\n");
i=0;
while (i < a) {
for(k=0; k<b; k++) printf(" %d ", array[i][k]);
printf("\n");
i++;
}
}